package library_management.operation.impl;

import library_management.book.BookList;
import library_management.operation.IOperation;

public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("=====================================");
        System.out.println("您当前正在进行删除操作！");
        System.out.println("请输入您要删除的书籍：");
        String removeBook=scanner.next();
        if(bookList.isContains(removeBook))
        {
            bookList.remove(removeBook);
            System.out.println("下架成功！");
        }
        else
        {
            System.out.println("图书馆暂时没有这本书，无需删除");
        }

    }
}
